
import BathRoomView from "../../bathroom/view/BathRoomView";
import GlobalEvent from "../../../cfw/event/GlobalEvent";
import { EventName } from "../../../public/Config";


const { ccclass, property } = cc._decorator;

@ccclass
export default class BornStepView2 extends BathRoomView {

    private time: number = 0;
    collide(pos) {
        switch (this.clickIndex) {
            case 0://喷头
                this.time += 0.016;
                if (this.time >= 2) {
                    GlobalEvent.instance().emit(EventName.UPDATE_SLEEP_STEP, 4)
                    this.clickIndex = -1;
                }
                break;

        }
    }


}
